/**
 * 
 */
package com.axt.dbaudit.unitTest;

import java.util.List;

import com.axt.dbaudit.bean.EmailCfgBean;
import com.axt.dbaudit.model.EmailCfg;

/**
 * @author wangyl
 *
 */
public class SoaEmailCfg {

	/**
	 * testQueryEmailCfg
	 */
	void testQueryEmailCfg()
	{
		List<EmailCfg> aEmailCfg = null;
		aEmailCfg = new EmailCfgBean().queryEmailCfg();
		if(aEmailCfg !=null)
    	{
    		System.out.println("获取邮件服务器配置成功");
    	} 
	}
	/**
	 *  @param args
	 */
	void testUpdateEmailCfg()
	{
		EmailCfg aEmailCfg = new EmailCfg();
		aEmailCfg.setAu_host("smtp.163.com");
		aEmailCfg.setAu_port("25");
		aEmailCfg.setAu_UserName("test");
		aEmailCfg.setAu_Passwd("123456");
		aEmailCfg.setAu_Faddress("192.168.1.27");
		aEmailCfg.setAu_Taddress("192.168.1.101");
		boolean bRet = false;
		bRet = new EmailCfgBean().updateEmailCfg(aEmailCfg);
		if (bRet)
		{
			System.out.println("更新安全配置成功！");
		}
	}
	public static void main(String[] args) throws Exception{
		new SoaEmailCfg().testQueryEmailCfg();
		new SoaEmailCfg().testUpdateEmailCfg();
	}

}
